/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package cn.apestar.modules.report.useraccount.entity;

import cn.apestar.common.persistence.DataEntity;
import cn.apestar.modules.sys.entity.User;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 用户账户Entity
 *
 * @author yudw
 * @version 2016-08-18
 */
public class UserAccount extends DataEntity<UserAccount> implements Comparable<UserAccount> {

    private static final long serialVersionUID = 1L;

    private String experience; // 经验值

    private String credit; // 积分

    private String gold; // 金币

    private String level; // 等级

    private String lotteryTimes; // 抽奖次数

    private User user; // 用户ID

    private Date lastLoginTime; // 最近一次登录时间

    private Date updateTime; // 更新时间

    private String isVip; // 是否是VIP

    private Date vipExpireTime; // VIP过期时间

    private String balanceNormal; // 普通账户余额

    private String balanceVip; // VIP账户余额

    private String totalBenefit; // 总收益

    private String discount; // 折扣

    private String deposit; // 折扣

    private String dayOfCount; // 日总数量

    private String allCount; // 总数

    private Date startDate; // 开始日期

    private Date endDate; // 结束日期

    private String android; // 安卓日数量

    private String androidCount; // 安卓总数

    private String ios; // ios日数量

    private String iosCount; // ios总数

    private String other; // 其他来源

    private String otherCount; // 其他来源总数

    private String count; // 对应终端数量

    private String terminal; // 终端

    public String getDeposit() {
        return deposit;
    }

    public void setDeposit(String deposit) {
        this.deposit = deposit;
    }

    public String getOtherCount() {
        return otherCount;
    }

    public void setOtherCount(String otherCount) {
        this.otherCount = otherCount;
    }

    public String getCount() {
        return count;
    }

    public void setCount(String count) {
        this.count = count;
    }

    public String getTerminal() {
        return terminal;
    }

    public void setTerminal(String terminal) {
        this.terminal = terminal;
    }

    public String getOther() {
        return other;
    }

    public void setOther(String other) {
        this.other = other;
    }

    public String getAndroid() {
        return android;
    }

    public void setAndroid(String android) {
        this.android = android;
    }

    public String getAndroidCount() {
        return androidCount;
    }

    public void setAndroidCount(String androidCount) {
        this.androidCount = androidCount;
    }

    public String getIos() {
        return ios;
    }

    public void setIos(String ios) {
        this.ios = ios;
    }

    public String getIosCount() {
        return iosCount;
    }

    public void setIosCount(String iosCount) {
        this.iosCount = iosCount;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public String getAllCount() {
        return allCount;
    }

    public void setAllCount(String allCount) {
        this.allCount = allCount;
    }

    public String getDayOfCount() {
        return dayOfCount;
    }

    public void setDayOfCount(String dayOfCount) {
        this.dayOfCount = dayOfCount;
    }

    public UserAccount() {
        super();
    }

    public UserAccount(String id) {
        super(id);
    }

    @Length(min = 1, max = 11, message = "经验值长度必须介于 1 和 11 之间") public String getExperience() {
        return experience;
    }

    public void setExperience(String experience) {
        this.experience = experience;
    }

    @Length(min = 1, max = 11, message = "积分长度必须介于 1 和 11 之间") public String getCredit() {
        return credit;
    }

    public void setCredit(String credit) {
        this.credit = credit;
    }

    @Length(min = 1, max = 11, message = "金币长度必须介于 1 和 11 之间") public String getGold() {
        return gold;
    }

    public void setGold(String gold) {
        this.gold = gold;
    }

    @Length(min = 1, max = 11, message = "等级长度必须介于 1 和 11 之间") public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    @Length(min = 1, max = 11, message = "抽奖次数长度必须介于 1 和 11 之间") public String getLotteryTimes() {
        return lotteryTimes;
    }

    public void setLotteryTimes(String lotteryTimes) {
        this.lotteryTimes = lotteryTimes;
    }

    @NotNull(message = "用户ID不能为空") public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Date getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(Date lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @NotNull(message = "更新时间不能为空")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Length(min = 1, max = 1, message = "是否是VIP长度必须介于 1 和 1 之间") public String getIsVip() {
        return isVip;
    }

    public void setIsVip(String isVip) {
        this.isVip = isVip;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Date getVipExpireTime() {
        return vipExpireTime;
    }

    public void setVipExpireTime(Date vipExpireTime) {
        this.vipExpireTime = vipExpireTime;
    }

    public String getBalanceNormal() {
        return balanceNormal;
    }

    public void setBalanceNormal(String balanceNormal) {
        this.balanceNormal = balanceNormal;
    }

    public String getBalanceVip() {
        return balanceVip;
    }

    public void setBalanceVip(String balanceVip) {
        this.balanceVip = balanceVip;
    }

    public String getTotalBenefit() {
        return totalBenefit;
    }

    public void setTotalBenefit(String totalBenefit) {
        this.totalBenefit = totalBenefit;
    }

    public String getDiscount() {
        return discount;
    }

    public void setDiscount(String discount) {
        this.discount = discount;
    }

    @Override public int compareTo(UserAccount o) {
        return o.createDate.compareTo(this.createDate);
    }

}